package com.efuture.filter;

import jakarta.servlet.*;

import java.io.IOException;

/**
 * @description: 我是第一个过滤器 测试多过滤器执行顺序
 * @author zhaoshanshan
 * @date 2021/10/4 9:13 下午
 * @version 1.0
 */
//@WebFilter("/*")
public class FilterTestOne implements Filter {
    @Override
    public void init(FilterConfig filterConfig) throws ServletException {
        Filter.super.init(filterConfig);
    }

    @Override
    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
        System.out.println("第一个过滤器执行了");
        filterChain.doFilter(servletRequest,servletResponse);
        System.out.println("第一个过滤器回来了");
    }

    @Override
    public void destroy() {
        Filter.super.destroy();
    }
}
